package com.more.offer.designpatterns.observer2.observer;

import com.more.offer.designpatterns.observer2.subject.Subject;
import com.more.offer.designpatterns.observer2.subject.WeatherDarta;

/**
 * @author pinoc
 * @date 2021/11/2
 * @description
 */
public class School implements Observer{
	private Subject weatherData;

	public School() {
	}

	public School(Subject weatherData) {
		this.weatherData = weatherData;
		weatherData.registerObserver(this);
	}

	@Override
	public void update(float temp, float humidity, float pressure) {
		System.out.println("学校收到了天气通知。。。temp: " + temp + " humidity: "+humidity +" pressure: " +pressure);
	}
}
